package com.ks.service;

import com.ks.base.BaseService;
import com.ks.dao.ContentDao;
import com.ks.entity.Content;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("contentService")
public class ContentService<T> extends BaseService<T> {
    private final static Logger log = Logger.getLogger(ContentService.class);

    @Autowired
    private ContentDao<T> dao;

    public ContentDao<T> getDao() {
        return dao;
    }

    public List<Content> queryByListDep(Object o) {
        return dao.queryByListDep(o);
    }

    /**
     *模糊搜索ajax
     *
     *
     * @return
     */
    public List<Content> toKnowsAjax(Map<String, Object> map){
        return dao.findAllByDepIdAndKeyword(map);
    }
}
